<?php
    function is_mobile(){
        if(preg_match('/(iphone|ipad|ipod|android)/i', strtolower($_SERVER['HTTP_USER_AGENT']))){
            return true;
        }else{
            return false;
        }
    }
    $isMobile = is_mobile();
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="renderer" content="webkit">
    <meta charset="utf-8">
    <title>[title]</title>
    <meta name="viewport" content="width=device-width,height=device-height,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="/Public/index/bootstrap.min.css">
    <link rel="stylesheet" href="/Public/index/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/Public/index/style.css">
    <script charset="UTF-8" src="/Public/index/base.js"></script>
    <script src="/Public/index/jquery.min.js"></script>
    <script src="/Public/index/bootstrap.min.js"></script>
    <style type="text/css">#MECHAT-PCBTN {
        font-family: "Helvetica Neue", Helvetica, "Microsoft Yahei", Arial, sans-serif;
        font-size: 16px;
        line-height: 24px;
        position: fixed;
        bottom: -100%;
        background: #1abc9c;
        color: #fff;
        text-align: center;
        padding: 10px 15px 8px;
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        cursor: pointer;
        z-index: 2147483645;
    }

    #MECHAT-PCBTN span {
        display: inline-block;
        height: 24px;
        padding: 0 0 0 34px;
        background: url("//meiqia.com/images/pc_btn_icon.png") 0 0 no-repeat
    }

    #MECHAT-LAYOUT {
        position: fixed;
        right: 80px;
        bottom: -100%;
        width: 300px;
        height: 430px;
        z-index: 2147483647;
        overflow: hidden;
        background: #fff;
        border: 1px solid #1abc9c;
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        box-shadow: 0 0 3px 2px rgba(135, 135, 135, 0.1)
    }

    #MECHAT-PCBTN, #MECHAT-LAYOUT {
        _position: absolute;
        _bottom: auto;
        _top: expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))
    }</style>
    <style type="text/css">#yddContainer {
        display: block;
        font-family: Microsoft YaHei;
        position: relative;
        width: 100%;
        height: 100%;
        top: -4px;
        left: -4px;
        font-size: 12px;
        border: 1px solid
    }

    #yddTop {
        display: block;
        height: 22px
    }

    #yddTopBorderlr {
        display: block;
        position: static;
        height: 17px;
        padding: 2px 28px;
        line-height: 17px;
        font-size: 12px;
        color: #5079bb;
        font-weight: bold;
        border-style: none solid;
        border-width: 1px
    }

    #yddTopBorderlr .ydd-sp {
        position: absolute;
        top: 2px;
        height: 0;
        overflow: hidden
    }

    .ydd-icon {
        left: 5px;
        width: 17px;
        padding: 0px 0px 0px 0px;
        padding-top: 17px;
        background-position: -16px -44px
    }

    .ydd-close {
        right: 5px;
        width: 16px;
        padding-top: 16px;
        background-position: left -44px
    }

    #yddKeyTitle {
        float: left;
        text-decoration: none
    }

    #yddMiddle {
        display: block;
        margin-bottom: 10px
    }

    .ydd-tabs {
        display: block;
        margin: 5px 0;
        padding: 0 5px;
        height: 18px;
        border-bottom: 1px solid
    }

    .ydd-tab {
        display: block;
        float: left;
        height: 18px;
        margin: 0 5px -1px 0;
        padding: 0 4px;
        line-height: 18px;
        border: 1px solid;
        border-bottom: none
    }

    .ydd-trans-container {
        display: block;
        line-height: 160%
    }

    .ydd-trans-container a {
        text-decoration: none;
    }

    #yddBottom {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 22px;
        line-height: 22px;
        overflow: hidden;
        background-position: left -22px
    }

    .ydd-padding010 {
        padding: 0 10px
    }

    #yddWrapper {
        color: #252525;
        z-index: 10001;
        background: url(chrome-extension://ibogfemlnclpecapkojhmanpiebldbnk/ab20.png);
    }

    #yddContainer {
        background: #fff;
        border-color: #4b7598
    }

    #yddTopBorderlr {
        border-color: #f0f8fc
    }

    #yddWrapper .ydd-sp {
        background-image: url(chrome-extension://ibogfemlnclpecapkojhmanpiebldbnk/ydd-sprite.png)
    }

    #yddWrapper a, #yddWrapper a:hover, #yddWrapper a:visited {
        color: #50799b
    }

    #yddWrapper .ydd-tabs {
        color: #959595
    }

    .ydd-tabs, .ydd-tab {
        background: #fff;
        border-color: #d5e7f3
    }

    #yddBottom {
        color: #363636
    }

    #yddWrapper {
        min-width: 250px;
        max-width: 400px;
    }</style>
</head>
<body>
    <nav class="navbar navbar-default navbar-shrink">
        <nav class="navbar navbar-default">
            <div class="container">
                <div class="navbar-header page-scroll">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#beatsbeans-navbar">
                       <!--  <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span> -->
                    </button>
                    <a class="navbar-brand page-scroll" style="text-align: center;" href="/">
                        <strong>超老师<br>SUPER TEACHER
                            <span class="en"></span></strong>
                    </a>
                </div>
                <div class="collapse navbar-collapse" id="beatsbeans-navbar">
                    <ul class="nav navbar-nav navbar-right">
                        <?php
                            if($_SESSION['phone']){
                        ?>
                        <li class="disappear_when_log">
                            <?php if($_SESSION['type'] == 2){?>
                            <a>
                                <?php echo $_SESSION['phone']?>
                            </a>
                        </li>
                        <li class="disappear_when_log">
                            <a href="/Home/Order/studentorder">
                                我的课程
                            </a>
                        </li>
                        <?php } ?>
                        <?php if($_SESSION['type'] == 1){?>
                        <li>
                            <a href="/Home/Teacher/center">
                                <?php echo $_SESSION['phone']?>
                            </a>
                        </li>
                        <?php } ?>
                        <li class="disappear_when_log"><a href="/Home/Index/logoout">退出</a></li>

                        <?php
                            }else{
                        ?>
                        <li class="disappear_when_log"><a href="/Home/Index/register">注册</a></li>
                        <li class="disappear_when_log"><a href="/Home/Index/login">登录</a></li>
                        <?php
                            }
                        ?>

                        <li><a href="/Home/Index/teacherList">浏览教员</a></li>
                        <li><a href="/Home/Requirement/index/status/0">家教需求列表</a></li>
                    </ul>
                </div>
                <!-- /.navbar-collapse -->
            </div>
            <!-- /.contaienr -->
        </nav>
    </nav>

